<?php
function curPageURL() {
 $pageURL = 'http';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
 return $pageURL;
}
?>
<?php 
$t = mysql_fetch_array(mysql_query("select * from phim where maphim ={$_GET['id']} and linkanh is not null"));
$thongtin =  $t['gioithieu'];
$tenphim = $t['tenphim'];
$tentap=$_GET['tentap'];
$view = $t['view']+1;mysql_query("update phim set view = {$view} where maphim = {$_GET['id']} ");
$select = mysql_query("select * from phim where tentap ='{$_GET['tentap']}' and tenphim ='$tenphim'");
$d=mysql_fetch_array($select);
$lienket=$d['lienket'];
?>
<span id="seo_description" style="display:none"> Xem phim <?php echo $t['tenphim']?> Tập Full | Phim <?php echo $t['tenphim']?> Episode Full | Tập Full | Server PicasaWeb |  - Phim, Xem Phim Online, Phim Chieu Rap, Movies, Download movies - Xem phim Online, Watch Movies Online, Download phim, phim hay, phim dac sac, phim hanh dong, phim vo thuat, phim bo, phim le, phim han quoc, phim hong kong, phim an do</span>
<span id="seo_keywords" style="display:none"> Xem phim <?php echo $t['tenphim']?> Tập <?php echo $tentap?>, Xem phim <?php echo $t['tenphim']?> Server PicasaWeb , Watch <?php echo $t['tenphim']?> Episode <?php echo $tentap?>, tai phim <?php echo $t['tenphim']?> , download <?php echo $t['tenphim']?></span>
<h1 class="ps_title"><?php echo $d['tenphim']?></h1>
<div class="clear"></div>
<div class="ps_padding_10">
<center>
	<div id="loader" title="" alt="<?php echo $t['maphim']?>" style="background-color:#000;width:680px;height:550px"> 
    <?php 
		$servr= explode('-',$tentap);
		switch($servr[2])
		{
			case '':echo '<embed src="http://phimsot.com/html/phimsotplayer/player.swf"
		flashvars="'.$lienket.'" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="676" height="520" wmode="transparent">
    ';break;
			case 'picasa':?>
<object id="flashplayer" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="680" height="550">
<param name="movie" value="gkplugins_picasaweb/player.swf" />
<param name="allowFullScreen" value="true" />
<param name="allowScriptAccess" value="always" />
<param name="FlashVars" value="plugins=gkplugins_picasaweb/plugins/proxy.swf&proxy.link=<?php echo $lienket ?>" />
<embed name="flashplayer" src="gkplugins_picasaweb/player.swf" FlashVars="plugins=gkplugins_picasaweb/plugins/proxy.swf&<?php echo $lienket ?>" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="680" height="530" />
</object><?php ;break;
			case 'youtube':?><script src="jwplayer/jwplayer.js" ></script>
            <div id="myElement">Loading the player...</div>
			<script type="text/javascript">
                jwplayer("myElement").setup({
					height:550,
					width:640,
                    file:"<?php echo str_replace('file=','',$lienket);?>",
                });
            </script><?php break;
                    }
                ?>	
    </div>
    
</center>
<center>Click +1 để giúp chúng tôi phục vụ bạn tốt hơn: 
<div class="plusone">
<div style="text-indent: 0px; margin: 0px; padding: 0px; background-color: transparent; border-style: none; float: none; line-height: normal; font-size: 1px; vertical-align: baseline; display: inline-block; width: 70px; height: 15px; background-position: initial initial; background-repeat: initial initial;" id="___plusone_0">
<iframe frameborder="0" hspace="0" marginheight="0" marginwidth="0" scrolling="no" style="position: static; top: 0px; width: 70px; margin: 0px; border-style: none; left: 0px; visibility: visible; height: 15px;" tabindex="0" vspace="0" width="100%" id="I0_1366161162726" name="I0_1366161162726" src="https://plusone.google.com/_/+1/fastbutton?bsv&amp;size=small&amp;hl=en-US&amp;origin=http%3A%2F%2Fphimsot.com&amp;url=http%3A%2F%2Fphimsot.com%2Fxem-phim%2Fhuong-dong-co-noi-better-and-better-m5858e1024037.html&amp;ic=1&amp;jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.vi.AYAwafdhwHw.O%2Fm%3D__features__%2Fam%3DQQ%2Frt%3Dj%2Fd%3D1%2Frs%3DAItRSTN_H8wUToi3itN6hQbQPH7kUWtqgw#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled&amp;id=I0_1366161162726&amp;parent=http%3A%2F%2Fphimsot.com&amp;rpctoken=29700964" allowtransparency="true" data-gapiattached="true" title="+1">
</iframe>
</div>
</div>Chia sẻ phim này cho bạn bè:&nbsp;
<a class="share_icon share_icon_facebook" onclick="popup_center('http://www.facebook.com/sharer.php?u=<?php  echo curPageURL();?>', 'Chia sẻ trên Facebook', 700, 500);return false;" href="http://www.facebook.com/sharer.php?u=<?php  echo curPageURL();?>;t=<?php  echo curPageURL();?>" title="Chia sẻ trên Facebook" target="_blank" rel="nofollow">
<span class="ps_hidden">Chia sẻ trên Facebook</span>
</a>
<a class="share_icon share_icon_google" onclick="popup_center('https://plus.google.com/share?url=<?php  echo curPageURL();?>', 'Chia sẻ trên Google+', 700, 500);return false;" href="https://plus.google.com/share?url=<?php  echo curPageURL();?>" title="Chia sẻ trên Google+" target="_blank" rel="nofollow">
<span class="ps_hidden">Chia sẻ trên Google+</span>
</a>
<a class="share_icon share_icon_zingme" onclick="popup_center('http://link.apps.zing.vn/share?url=<?php  echo curPageURL();?>;t=<?php  echo curPageURL();?>', 'Chia sẻ trên Zing Me', 700, 500);return false;" href="http://link.apps.zing.vn/share?url=<?php  echo curPageURL();?>;t=<?php  echo curPageURL();?>" title="Chia sẻ trên Zing Me" target="_blank" rel="nofollow">
<span class="ps_hidden">Chia sẻ trên Zing Me</span>
</a>
</center><br>
<div class="film_intro">
    <div class="film_action">
        <span class="star-rating-control">
        	<?php 

			$rating = mysql_query("select AVG(diem) from rate,thongtinphim where rate.marate=thongtinphim.marate and thongtinphim.maphim = {$t['maphim']}") or die(mysql_error());
			$r=mysql_fetch_array($rating);
			$diem=round($r['AVG(diem)']);
			$title=array("Thất vọng","Bình thường","Tạm được","Hài lòng","Rất hài lòng");
			for($i=0;$i<=4;$i++)
			{
				if($i<$diem)
				{
					echo "<div class='star-rating star-rating-on'><a title='".$title[$i]."'>".$i."</a></div>";
				}
				else echo "<div class='star-rating'><a title='".$title[$i]."'>".$i."</a></div>";
			}
			?>
        </span>
        <span id="star_text">&lt;== Click để đánh giá phim này</span>
    </div>
	<div class="film_link">
        <span class="film_info">
        <a class="no_title" title="Xem thông tin phim" href="javascrip:void(0)">Thông tin phim</a></span>
        <span class="film_share"><a class="no_title" title="Chèn phimvào blog" href="javascript:void(0)">Mã nhúng</a></span>
        <span class="report"><a id="ps_episodereport" class="no_title" href="javascript:void(0)" title="Báo link phim này không xem được cho BQT để sửa">Báo lỗi</a></span></div>
        <div class="ps_clear"> 
    </div>
    <div id="film_info" style="display:none;clear:both"><span style="display:block;clear:both"><?php echo $thongtin?></span></div>
    <div id="film_share" style="display:none"><form class="form form_share" method="post" action="<?php  echo curPageURL();?>">
    <table border="0">
    <tbody>
    <tr>
    <td><label for="share_url">Copy gửi cho bạn bè:</label> </td>
    <td><input class="text" type="text" id="share_url" value="<?php  echo curPageURL();?>" onclick="this.select()" readonly="readonly"></td>
    </tr>
    <tr>
    <td><label for="share_website">Copy nhúng vào website:</label> </td>
    <td><input class="text" type="text" id="share_website" value="&lt;iframe width=&quot;676&quot; height=&quot;520&quot; src=&quot;<?php  echo curPageURL();?>&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;" onclick="this.select()" readonly="readonly"></td>
    </tr>
    <tr>
    <td><label for="share_blog">Copy nhúng vào blog:</label> </td><td><input class="text" type="text" id="share_blog" value="&lt;embed wmode=&quot;transparent&quot; name=&quot;flashplayer&quot; src=&quot;http://phimsot.com/html/phimsotplayer/player.swf&quot; width=&quot;676&quot; height=&quot;520&quot; allowfullscreen=&quot;true&quot; allowScriptAccess=&quot;always&quot; FlashVars=&quot;plugins=http://phimsot.com/html/phimsotplayer/plugin_picasaweb/proxy.swf,http://phimsot.com/html/phimsotplayer/viewfull.swf&amp;autostart=false&amp;proxy.link=phimsot*55a54f1515fbaadc3b2f84c944be801eb1f17a8746328113da6fd6c0b303d7d60b891fad2474e8acd337d3fefe8ccd0a3e6e6dbbc87d69409a23e732770d858c7fd23936d1a42984042373a2da3043b3232b13bbb0ca8f786a40119308c4672e&amp;repeat=list&amp;logo.file=http://phimsot.com/html/template/image/logo.gif&amp;logo.hide=false&amp;logo.position=top-left&amp;logo.margin=10&quot; /&gt;" onclick="this.select()" readonly="readonly"></td>
    </tr>
    <tr>
    <td><label for="share_forum">Copy nhúng vào forum:</label> </td>
    <td><input class="text" type="text" id="share_forum" value="Not Availabe yet" onclick="this.select()" readonly="readonly"></td>
    </tr>
    </tbody>
    </table>
    </form>
    </div>
</div>
    <div id="col1_ad_02">&nbsp;</div>
    <div class="clear"></div>
    <?php include("part.php")?>
    <div class="ps_clear"> 
    </div>
<br><br>
	<div class="ps_clear">
</div><br><br>
</div>
